﻿@model MvcTricks.RoundTripModelBinding.TestWebsite.ViewModels.ProductCataloqueViewModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Index</title>
</head>
<body>
@using (Html.BeginForm().AppendRoundTripModel(ViewContext))
{
    foreach (var cat in Model.ProductCategories)
    {
        <ul>
            <li>
                @cat.CategoryName<br />
                @foreach (var prod in cat.Products)
                {
                <ul>
                    <li>@prod.ProductName</li>
                </ul>
                }
            </li>
        </ul>
}
    @Html.RoundTripModelFor("Basket", ViewData["Basket"])
    <input type="submit" value="Buy a pair of Mizuno's" />
    <br />
    <br />
    <fieldset>
        <legend>Basket:</legend>
        @Html.Partial("BasketView", ViewData["Basket"])
    </fieldset>
}
</body>
</html>

